import  React,{Component} from 'react'
import { BackTop } from 'antd'
import {Redirect, Route, Switch} from 'react-router-dom'
import Navigation from '../../components/navigation/navigation'
import Footer from '../../components/footer/footer'

import ArticleList from '../mobile/article/list/list'
import ActivityList from "../mobile/activity/list/list";


import '../../static/css/main.less'
import ActivityView from "../mobile/activity/view/view";
import ActivityEdit from "../mobile/activity/edit/edit";

import ArticleEdit from "../mobile/article/edit/edit";
import Index from '../mobile/index'
import clientMain from "../mobile/client/main";
import clientMainOpen from '../mobile/client/main_open'
import NotFound from "../mobile/error/404NotFound";
import ArticleView from "../mobile/article/view/view";


class Home2 extends Component{
    constructor(props) {
        super(props);
        this.state={}
    }
    render() {
        return　(
            <>
                <Navigation />
                <div className="mainContent" style={{ margin:'0' }}>
                    <Switch>
                        <Route path='/index' component={Index} name='index'/>
                        <Route path='/article/list' component={ArticleList} name='article_list'/>
                        <Route path='/article/edit' component={ArticleEdit} name='article_edit'/>
                        <Route path='/article/author/:author' component={clientMainOpen} name='article_author'/>
                        <Route path='/article/view/:no' component={ArticleView} name='article_view'/>
                        <Route path='/activity/list' component={ActivityList} name='activity_list'/>
                        <Route path='/activity/view' component={ActivityView} name='activity_view'/>
                        <Route path='/activity/edit' component={ActivityEdit} name='activity_edit'/>
                        <Route path='/client' component={clientMain} name='clientMain'/>
                        <Route path="/NotFound" component={NotFound} name='NotFound'/>
                        <Redirect  from="/" to="/index" />
                        <Redirect from="*" to="/NotFound" />
                    </Switch>
                </div>
                <BackTop>
                    <div>UP</div>
                </BackTop>
                <Footer/>
            </>
        )
    }
}

export default Home2
